package com.bnyy.message.bean.chat.message_data;

import com.bnyy.message.bean.ContactUser;
import com.bnyy.message.bean.Message;
import com.bnyy.message.enums.MessageType;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2022/12/8
 **/
@Table(name = "message_user_home_page")
public class UserHomePageMessage extends MessageData {

    public interface ColumnName {
        String USER_ID = "user_id";
        String ROLE_ID = "role_id";
    }

    @Column(name = ColumnName.USER_ID)
    private int user_id;
    @Column(name = ColumnName.ROLE_ID)
    @SerializedName("role_id")
    private int roleId = 2;
    private String username;
    private String user_img;
    private String brief;
    private int fans;
    private int likes;

    private ContactUser contactUser;

    public UserHomePageMessage() {
    }

    @Override
    public  MessageType getMessageType() {
        return MessageType.USER_HOMEPAGE;
    }

    public UserHomePageMessage(String msgId, JsonObject jsonObject) {
        super(msgId, jsonObject);
        setUser_id(jsonObject.get("user_id").getAsInt());
    }

    public UserHomePageMessage(String msgId, int user_id) {
        super(msgId);
        this.user_id = user_id;
    }

    public ContactUser getContactUser() {
        return contactUser;
    }

    public void setContactUser(ContactUser contactUser) {
        this.contactUser = contactUser;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUser_img() {
        return user_img;
    }

    public void setUser_img(String user_img) {
        this.user_img = user_img;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

    public int getFans() {
        return fans;
    }

    public void setFans(int fans) {
        this.fans = fans;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }
}
